package com.u3k.sdk;

import android.net.Uri;
import android.text.TextUtils;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;

class f
  implements e
{
  private final String a;
  private final HashMap<String, File> b = new HashMap();
  
  public f(String paramString)
  {
    this.a = paramString;
  }
  
  public void a(String paramString, File paramFile)
  {
    if (TextUtils.isEmpty(paramString)) {}
    try
    {
      paramFile = paramFile.getCanonicalFile();
    }
    catch (IOException localIOException) {}
    this.b.put(paramString, paramFile);
  }
  
  public File a(Uri paramUri)
  {
    String str1 = paramUri.getEncodedPath();
    int i = str1.indexOf('/', 1);
    String str2 = Uri.decode(str1.substring(1, i));
    str1 = Uri.decode(str1.substring(i + 1));
    File localFile1 = (File)this.b.get(str2);
    if (localFile1 == null) {}
    File localFile2 = new File(localFile1, str1);
    try
    {
      localFile2 = localFile2.getCanonicalFile();
    }
    catch (IOException localIOException) {}
    if ((localFile1 != null) && (!localFile2.getPath().startsWith(localFile1.getPath()))) {}
    return localFile2;
  }
}


